package com.kingmed.kmss.framework.feign.client.hr;


import com.kingmed.kmss.common.dto.admin.ums.HRQueryDTO;
import feign.Response;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;


/**
 * HR系统
 */
@FeignClient(name = "RemoteHRSService", url = "${bamp.serviceUrl}", fallback = RemoteHRFallbackService.class)
public interface RemoteHRSService {

    /**
     * HR系统: 获取组织结构信息
     */
    @PostMapping(value = "/dcai/api/v1/shrOrgAdminV/findByPage",
            headers = {"Authorization=${bamp.authorization}"},
            consumes = MediaType.APPLICATION_JSON_VALUE)
    Response getOrgList(@RequestBody HRQueryDTO queryDTO);

    /**
     * HR系统: 获取员工信息
     */
    @PostMapping(value = "/dcai/api/v1/shrOaPerson/findByPage",
            headers = {"Authorization=${bamp.authorization}"},
            consumes = MediaType.APPLICATION_JSON_VALUE)
    Response getEmployeeList(@RequestBody HRQueryDTO queryDTO);

}
